
public class Test {

    public static void main5(String[] args) {
        String str = "HELLO WORLD&111222&JAVA!";
        //System.out.println(str.toUpperCase());
        System.out.println(str.toLowerCase());
    }

    public static void main4(String[] args) {
        String str1 = " zhang san " ;
        String str2 = " hello java ";
        System.out.println("["+str1+"]");
        System.out.println("["+str2+"]");
        System.out.println("----------------------------");
        System.out.println("["+str1.trim()+"]");
        System.out.println("["+str2.trim()+"]");
    }

    public static void main3(String[] args) {
        String str  = "helloworld";
        //System.out.println(str.substring(5));
        System.out.println(str.substring(0, 5));
    }
    public static void main2(String[] args) {
        String str = "name=zhangsan&age=19";
        String[] result = str.split("&");
        for (int i = 0; i < result.length; i++) {
            String[] temp = result[i].split("=");
            System.out.println(temp[0] + " = " + temp[1]);

        }
    }

    public static void main1(String[] args) {
        String str = "192.168.10.10" ;
        String[] result = str.split("\\.") ;
        for(String s: result) {
            System.out.println(s);
        }
    }
}
